package Book;

/**
 * Created with IntelliJ IDEA.
 * Description:书架
 * User: 86184
 * Date: 2023-02-18
 * Time: 15:23
 */
public class BookList {
    public Book[] books=new Book[10];
    private int useSize;//存储当前书的个数

    public BookList(){
        books[0]=new Book("三国演义","罗贯中",89,"小说");
        books[1]=new Book("西游记","吴承恩",56,"小说");
        books[2]=new Book("红楼梦","曹雪芹",65,"小说");
        this.useSize=3;
    }

    public int getUseSize() {
        return useSize;
    }

    public void setUseSize(int useSize) {
        this.useSize = useSize;
    }

    public Book getPos(int pos){
        return books[pos];
    }

    public void setBooks(Book book,int pos){
        books[pos]=book;
    }
}
